Extras:

  1. If the number is a multiple of 4, print out a different message.
  2. Ask the user for two numbers: one number to check (call it num) and one number to divide by (check). If check divides evenly into num, tell that to the user. If not, print a different appropriate message.

詢問用戶一個數字。根據數字是偶數還是奇數,向用戶打印一條適當的消息。提示:偶數/奇數除以2時的反應如何?

附加功能:

  1. 如果數字是4的倍數,請打印出另一條消息。
  2. 向用戶詢問兩個數字:一個數字要檢查(稱為num),另一個數字要除以(check)。如果check平均分為num,請告知用戶。如果不是,請打印其他適當的消息。

Odd Or Even奇數或偶數 << Previous Next >> Discussion討論區-2

Copyright © All rights reserved | This template is made with by Colorlib